package yxy.game.pm2.bean.module.rank.active;

import yxy.game.pm2.bean.area.AreaBean;
import yxy.game.pm2.bean.module.rank.RankModule;

public abstract class AreaActiveRankModule extends RankModule {
	private int areaId;
	private int type;
	
	public int getAreaId() {
		return areaId;
	}

	public void setAreaId(int areaId) {
		this.areaId = areaId;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public AreaActiveRankModule(AreaBean areaBean, int type) {
		if (areaBean != null) {
			setAreaId(areaBean.getAreaId());
		}
		this.type = type;
	}

	@Override
	protected String rankKey() {
		return String.format("AREA:%s:RANK:%s", getAreaId(), rankActiveName());
	}
	
	public String rankActiveName() {
		return rankName() + type;
	}
}
